using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;

namespace Krile.Forms.Dialogs.Popup
{

    public partial class Splash : Form
    {
        public Splash()
        {
            InitializeComponent();
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.CompositingQuality = CompositingQuality.HighQuality;
            e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
            Rectangle rect = this.ClientRectangle;
            using (var b = new LinearGradientBrush(this.ClientRectangle, Color.White, Color.MintCream, 90))
            {
                b.GammaCorrection = true;
                e.Graphics.FillRectangle(b, rect);
            }
            Rectangle outer = this.ClientRectangle;
            outer.Width--;
            outer.Height--;
            e.Graphics.DrawRectangle(Pens.PowderBlue, outer);
            base.OnPaint(e);
        }


        private void Splash_Load(object sender, EventArgs e)
        {
            versionLabel.Text = "Version " + Define.VersionString;
        }
    }
}